<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class template special_values_formatter</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../date_time/doxy.html#doxygen.date_time_reference.special__values__formatter_8hpp" title="Header &lt;boost/date_time/special_values_formatter.hpp&gt;">
<link rel="prev" href="classboost_1_1date__time_1_1period__parser.html" title="Class template period_parser">
<link rel="next" href="classboost_1_1date__time_1_1special__values__parser.html" title="Class template special_values_parser">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="classboost_1_1date__time_1_1period__parser.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../date_time/doxy.html#doxygen.date_time_reference.special__values__formatter_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="classboost_1_1date__time_1_1special__values__parser.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="doxygen.date_time_reference.classboost_1_1date__time_1_1special__values__formatter"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template special_values_formatter</span></h2>
<p>boost::date_time::special_values_formatter — Class that provides generic formmatting ostream formatting for special values. </p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../date_time/doxy.html#doxygen.date_time_reference.special__values__formatter_8hpp" title="Header &lt;boost/date_time/special_values_formatter.hpp&gt;">boost/date_time/special_values_formatter.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CharT<span class="special">,</span> 
         <span class="keyword">typename</span> OutItrT <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ostreambuf_iterator</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">char_traits</span><span class="special">&lt;</span><span class="identifier">CharT</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="special">&gt;</span> 
<span class="keyword">class</span> <a class="link" href="classboost_1_1date__time_1_1special__values__formatter.html" title="Class template special_values_formatter">special_values_formatter</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// types</span>
  <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_string</span><span class="special">&lt;</span> <span class="identifier">CharT</span> <span class="special">&gt;</span> <a name="doxygen.date_time_reference.classboost_1_1date__time_1_1special__values__formatter_1a0e9aa1b03adda44850319d8c9b0588f5"></a><span class="identifier">string_type</span><span class="special">;</span>    
  <span class="keyword">typedef</span> <span class="identifier">CharT</span>                      <a name="doxygen.date_time_reference.classboost_1_1date__time_1_1special__values__formatter_1a4f0bfc2bff1e93f38f25fe4d205e588f"></a><span class="identifier">char_type</span><span class="special">;</span>      
  <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span> <span class="identifier">string_type</span> <span class="special">&gt;</span> <a name="doxygen.date_time_reference.classboost_1_1date__time_1_1special__values__formatter_1a735bcfc14bb4dc7f1fdfd3646dda5124"></a><span class="identifier">collection_type</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="classboost_1_1date__time_1_1special__values__formatter.html#id-1_3_11_15_3_40_1_1_1_8-bb">public member functions</a></span>
  <a class="link" href="classboost_1_1date__time_1_1special__values__formatter.html#doxygen.date_time_reference.classboost_1_1date__time_1_1special__values__formatter_1a4c81ee7f7260d9d80b65fd179eff0921"><span class="identifier">special_values_formatter</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1date__time_1_1special__values__formatter.html#doxygen.date_time_reference.classboost_1_1date__time_1_1special__values__formatter_1ac579280e9fcac2596540787ae739727b"><span class="identifier">special_values_formatter</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_type</span> <span class="special">*</span><span class="keyword">const</span> <span class="special">*</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">char_type</span> <span class="special">*</span><span class="keyword">const</span> <span class="special">*</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1date__time_1_1special__values__formatter.html#doxygen.date_time_reference.classboost_1_1date__time_1_1special__values__formatter_1afa55ee8bf63c6c2150029a2f416e8c0d"><span class="identifier">special_values_formatter</span></a><span class="special">(</span><span class="keyword">typename</span> <span class="identifier">collection_type</span><span class="special">::</span><span class="identifier">iterator</span><span class="special">,</span> 
                           <span class="keyword">typename</span> <span class="identifier">collection_type</span><span class="special">::</span><span class="identifier">iterator</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">OutItrT</span> <a class="link" href="classboost_1_1date__time_1_1special__values__formatter.html#doxygen.date_time_reference.classboost_1_1date__time_1_1special__values__formatter_1a27756d6dccffbac8fff26e356acd9736"><span class="identifier">put_special</span></a><span class="special">(</span><span class="identifier">OutItrT</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">date_time</span><span class="special">::</span><span class="identifier">special_values</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>

  <span class="comment">// public data members</span>
  <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">char_type</span> <span class="identifier">default_special_value_names</span><span class="special">;</span>  <span class="comment">// Storage for the strings used to indicate special values. </span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.11.15.3.39.3.4"></a><h2>Description</h2>
<p>This class provides for the formmating of special values to an output stream. In particular, it produces strings for the values of negative and positive infinity as well as not_a_date_time. <br>
</p>
<p>While not a facet, this class is used by the date and time facets for formatting special value types. </p>
<div class="refsect2">
<a name="id-1.3.11.15.3.39.3.4.4"></a><h3>
<a name="id-1_3_11_15_3_40_1_1_1_8-bb"></a><code class="computeroutput">special_values_formatter</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="doxygen.date_time_reference.classboost_1_1date__time_1_1special__values__formatter_1a4c81ee7f7260d9d80b65fd179eff0921"></a><span class="identifier">special_values_formatter</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>Construct special values formatter using default strings. <p>Default strings are not-a-date-time -infinity +infinity </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.date_time_reference.classboost_1_1date__time_1_1special__values__formatter_1ac579280e9fcac2596540787ae739727b"></a><span class="identifier">special_values_formatter</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">char_type</span> <span class="special">*</span><span class="keyword">const</span> <span class="special">*</span> begin<span class="special">,</span> 
                         <span class="keyword">const</span> <span class="identifier">char_type</span> <span class="special">*</span><span class="keyword">const</span> <span class="special">*</span> end<span class="special">)</span><span class="special">;</span></pre>Construct special values formatter from array of strings. <p>This constructor will take pair of iterators from an array of strings that represent the special values and copy them for use in formatting special values. <br>
 </p>
<pre class="programlisting"><span class="keyword">const</span> <span class="keyword">char</span><span class="special">*</span> <span class="keyword">const</span> <span class="identifier">special_value_names</span><span class="special">[</span><span class="special">]</span><span class="special">=</span><span class="special">{</span><span class="string">"nadt"</span><span class="special">,</span><span class="string">"-inf"</span><span class="special">,</span><span class="string">"+inf"</span> <span class="special">}</span><span class="special">;</span>

<span class="identifier">special_value_formatter</span> <span class="identifier">svf</span><span class="special">(</span><span class="special">&amp;</span><span class="identifier">special_value_names</span><span class="special">[</span><span class="number">0</span><span class="special">]</span><span class="special">,</span> <span class="special">&amp;</span><span class="identifier">special_value_names</span><span class="special">[</span><span class="number">3</span><span class="special">]</span><span class="special">)</span><span class="special">;</span>
</pre>
<p> </p>
</li>
<li class="listitem"><pre class="literallayout"><a name="doxygen.date_time_reference.classboost_1_1date__time_1_1special__values__formatter_1afa55ee8bf63c6c2150029a2f416e8c0d"></a><span class="identifier">special_values_formatter</span><span class="special">(</span><span class="keyword">typename</span> <span class="identifier">collection_type</span><span class="special">::</span><span class="identifier">iterator</span> beg<span class="special">,</span> 
                         <span class="keyword">typename</span> <span class="identifier">collection_type</span><span class="special">::</span><span class="identifier">iterator</span> end<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="identifier">OutItrT</span> <a name="doxygen.date_time_reference.classboost_1_1date__time_1_1special__values__formatter_1a27756d6dccffbac8fff26e356acd9736"></a><span class="identifier">put_special</span><span class="special">(</span><span class="identifier">OutItrT</span> next<span class="special">,</span> 
                    <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">date_time</span><span class="special">::</span><span class="identifier">special_values</span> <span class="special">&amp;</span> value<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li>
</ol></div>
</div>
</div>
</div>
<div class="copyright-footer">Copyright © 2001-2005 CrystalClear Software, Inc<p>Subject to the Boost Software License, Version 1.0. (See accompanying file
    <code class="filename">LICENSE_1_0.txt</code> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="classboost_1_1date__time_1_1period__parser.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../date_time/doxy.html#doxygen.date_time_reference.special__values__formatter_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="classboost_1_1date__time_1_1special__values__parser.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
